package com.qdaily.ui.ui.views.QDWebView;

import android.webkit.ConsoleMessage;
import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebView;

import com.qdaily.supportlibrary.util.QLog;

/**
 * Created by song on 15/5/4.
 */
public class QDArticleWebChromeClient extends WebChromeClient{

    @Override
    public boolean onConsoleMessage(ConsoleMessage cm) {
        QLog.i("QDArticleWebChromeClient", "onConsoleMessage:" + cm.message() + ",line:" + cm.lineNumber());
        return true;
    }

    @Override
    public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
        result.cancel();
        QLog.i("QDArticleWebChromeClient", "onJsAlert:+" + message);
        return true;
    }

    @Override
    public void onReceivedTitle(WebView view, String title) {

    }
}
